home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 4
/
United Public Domain Gold 4.iso
/
tbag
/
tb046.dms
/
tb046.adf
/
Docs
/
mips.docs
< prev
next >
Wrap
Text File
|
1990-08-19
|
3KB
|
48 lines
/*****************************************************************************
* *
* DISCLAIMER *
* *
* I accept no responsibility to anyone for the consequences of using this *
* program and any of the files that come with it. I am releasing this *
* program and its associated files in Public Domain under the condition *
* that they all be distributed together. *
* *
* - Armando Romualdez - *
* *
*****************************************************************************/
This is a very simple program I wrote in C to get a feel of the relative cpu
performance between different amiga cpu configurations. All it does is perform
a given number of integer additions within a for-loop. The final result is
specified in MIPS or Million Instructions Per Second. Here are some of the
results I got for 10,000,000 loops (i.e. mips 10000000):
Amiga 68000 @ 7.16 Mhz w/MegaBoard2 fast ram : 0.815 MIPS
Amiga 68020 @ 18.14 Mhz w/MegaBoard2 fast ram (LUCAS w/out CACHE) : 0.917 MIPS
Amiga 68020 @ 18.14 Mhz w/MegaBoard2 fast ram (LUCAS w/ CACHE) : 5.263 MIPS
notes: - program execution was done @ priority level 127 on the Amiga
1000 with Kickstart 1.3 & Workbench 1.3.
- The MegaBoard2, is a 16-bit exapnsion fast ram
- for the C loop:
for(loop=0;loop<limit;loop++)
sum++;
the compiler generated the following assembly code:
ADDRESS INSTRUCTION 68000 CLOCK CYCLES COMMENT
00206754: MOVEQ #00,D5 4 loop=0;
00206756: CMP.L D4,D5 6 loop<limit?
00206758: BGE.B 00206760 8 (when branch not taken)
0020675A: ADDQ.L #1,D6 8 sum++;
0020675C: ADDQ.L #1,D5 8 loop++;
0020675E: BRA.B 00206756 10 repeat loop
- From the assembly code, it is clear that the cpu spends most of
its time executing location 00206756 to 0020675E. The first
instruction, MOVEQ, is merely executed once, and hence
does not contribute significantly to the time of execution.
- Higher loop values should yield more accurate results.